package com.lagou.edu.wwyan.web1.minicat;

import java.util.ArrayList;
import java.util.List;

public class Host implements LifeCycle{
    private String name;
    private String appBase;
    private List<Context> contexts = new ArrayList<>();

    public Host() {
    }

    public Host(String name, String appBase) {
        this.name = name;
        this.appBase = appBase;
    }

    @Override
    public void init() {

    }

    @Override
    public void start() {

    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAppBase() {
        return appBase;
    }

    public void setAppBase(String appBase) {
        this.appBase = appBase;
    }

    public List<Context> getContexts() {
        return contexts;
    }

    public void setContexts(List<Context> contexts) {
        this.contexts.addAll(contexts)  ;
    }

    public void addContext(Context context){
        this.contexts.add(context);
    }
}
